/*
 * Powered By [pkuWx]
 * Web Site: http://www.wuxi.ss.pku.edu.cn
 * Since 2015 - 2015
 */

package cn.edu.pku.wxlib.bookborrowtype.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.org.rapid_framework.util.DateConvertUtils;

import java.util.*;

import cn.edu.pku.wxlib.bookborrowtype.model.*;
import cn.edu.pku.wxlib.bookborrowtype.service.*;
import cn.edu.pku.wxlib.bookborrowtype.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @version 1.0
 * @since 1.0
 */


public class Bookborrowtype extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Bookborrowtype";
	public static final String ALIAS_BOOK_BORROW_TYPE_ID = "bookBorrowTypeId";
	public static final String ALIAS_BOOK_BORROW_TYPE_NAME = "新书/旧书/不外借";
	public static final String ALIAS_DURATION = "借阅天数";
	public static final String ALIAS_STATE = "1启用，0禁用";
	
	//date formats
	
	//columns START
    /** bookBorrowTypeId       db_column: bookBorrowTypeId */	
	
	private java.lang.Integer bookBorrowTypeId;
    /** 新书/旧书/不外借       db_column: bookBorrowTypeName */	
	@NotBlank @Length(max=6)
	private java.lang.String bookBorrowTypeName;
    /** 借阅天数       db_column: duration */	
	@NotNull 
	private java.lang.Integer duration;
    /** 1启用，0禁用       db_column: state */	
	
	private java.lang.Integer state;
	//columns END

	public Bookborrowtype(){
	}

	public Bookborrowtype(
		java.lang.Integer bookBorrowTypeId
	){
		this.bookBorrowTypeId = bookBorrowTypeId;
	}

	public void setBookBorrowTypeId(java.lang.Integer value) {
		this.bookBorrowTypeId = value;
	}
	
	public java.lang.Integer getBookBorrowTypeId() {
		return this.bookBorrowTypeId;
	}
	public void setBookBorrowTypeName(java.lang.String value) {
		this.bookBorrowTypeName = value;
	}
	
	public java.lang.String getBookBorrowTypeName() {
		return this.bookBorrowTypeName;
	}
	public void setDuration(java.lang.Integer value) {
		this.duration = value;
	}
	
	public java.lang.Integer getDuration() {
		return this.duration;
	}
	public void setState(java.lang.Integer value) {
		this.state = value;
	}
	
	public java.lang.Integer getState() {
		return this.state;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("BookBorrowTypeId",getBookBorrowTypeId())
			.append("BookBorrowTypeName",getBookBorrowTypeName())
			.append("Duration",getDuration())
			.append("State",getState())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getBookBorrowTypeId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Bookborrowtype == false) return false;
		if(this == obj) return true;
		Bookborrowtype other = (Bookborrowtype)obj;
		return new EqualsBuilder()
			.append(getBookBorrowTypeId(),other.getBookBorrowTypeId())
			.isEquals();
	}
}

